<?php 
$order = $mvc->getObject(OrdersService::ORDERS);
$errors = $mvc->getObject(ContentController::ERROR);
$status = $mvc->getObject(ContentController::STATUS);
?>
<h2>_i18n{Please, leave a comment.}</h2>
<div class="unitABlock unitABlockLast">
<?php if (isset($status )){?>
	<div class="itemOk">
		<?php echo $status ?>
	</div>
<?php } else {?>
<?php if (isset($_GET['id'])||isset($_POST['id'])){ ?>
<?php if (isset($errors )){?>
	<div class="itemWarning">
		<ul>
			<?php foreach ($errors as $key => $value){?>
				<li><?php echo $value ?></li>
			<?php } ?>					
		</ul>
	</div>
<?php } ?>
	<form action="/write-recommendation.html" method="POST">
		<div class="unitSnColumn">
			<dl class="itemForm">
				<dt>_i18n{Order Name}:</dt>
				<dd class="itemData"><b><?php echo $order[0][OrdersService::ORDER_NAME];?></b></dd>
			</dl>
			<div class="itemForm">
				<label>_i18n{Quality of work}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote1" value="<?php if(isset($_POST[CompanyService::VOTE1])) echo $_POST[CompanyService::VOTE1]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Reliability}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote2" value="<?php if(isset($_POST[CompanyService::VOTE2])) echo $_POST[CompanyService::VOTE2]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Cleanliness}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote3" value="<?php if(isset($_POST[CompanyService::VOTE3])) echo $_POST[CompanyService::VOTE3]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Price/Performance}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote4" value="<?php if(isset($_POST[CompanyService::VOTE4])) echo $_POST[CompanyService::VOTE4]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Project delivered}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote5" value="<?php if(isset($_POST[CompanyService::VOTE5])) echo $_POST[CompanyService::VOTE5]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Consulting Services}:</label>
				<div class="itemData unitRating">
					<div class="simpleRating">
						<ul>
							<li class="itemOne"><a href="#" title="1">1</a></li>
							<li class="itemTwo"><a href="#" title="2">2</a></li>
							<li class="itemThree"><a href="#" title="3">3</a></li>
							<li class="itemFour"><a href="#" title="4">4</a></li>
							<li class="itemFive"><a href="#" title="5">5</a></li>
							<li><input type="hidden" name="vote5" value="<?php if(isset($_POST[CompanyService::VOTE6])) echo $_POST[CompanyService::VOTE6]; ?>" /></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Comment}:</label>
				<div class="itemData"><textarea class="areaTxt" rows="10" cols="82" name="comment"><?php echo isset($_POST[CompanyService::COMMENT]) ? $_POST[CompanyService::COMMENT] : NULL; ?></textarea></div>
			</div>
		</div>
		<div class="unitBtn">
			<input type="hidden" name="id" value="<?php echo isset($_GET['id']) ? $_GET['id'] : $_POST['id'];?>"></input>
			<button name="send"><span><strong>_i18n{Send}</strong></span></button>
			<button name="back"><span><strong>_i18n{Discard}</strong></span></button>
		</div>
	</form>
<?php } else { ?>
	<div class="itemWarning">
		<ul>
			<li>_i18n{Oops wrong url. Please, go back}.</li>
		</ul>
	</div>
<?php } } ?>
</div>